#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include<QListView>
#include <QStandardItemModel>
#include<QListWidgetItem>
#include"game.h"
#include"tianqi.h"
#include"music.h"
#include<QNetworkReply>
#include <QMessageBox>
#include <QJsonObject>
#include <QJsonArray>
#include <QStandardItemModel>
#include <QDebug>
#include <QNetworkAccessManager>
#include <QJsonDocument>
#include <QtSql/QSqlDatabase>
#include <QtSql/QSqlQuery>
#include <QtSql/QSqlError>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

    bool isRequestInProgress();
public slots:

    void parseJsonmain(QByteArray byteArray);
    void replyFinishedmain(QNetworkReply *reply);
private slots:
    void on_listWidget_itemClicked(QListWidgetItem *item);

    void on_pushButton_clicked();

private:
    Ui::MainWindow *ui;
    game *pgame;
    tianqi *ptianqi;
    music *pmusic;
    QStandardItemModel *pmodel;
    QNetworkAccessManager *manager;
    QSqlDatabase db;

};
#endif // MAINWINDOW_H
